package com.student.service.impl;

import com.student.bean.Question;
import com.student.bean.Result;
import com.student.mapper.QuestionMapper;
import com.student.mapper.ResultMapper;
import com.student.service.TestService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TestServiceImpl implements TestService {
    @Resource
    private QuestionMapper questionMapper;
    @Resource
    private ResultMapper resultMapper;

    @Override
    public List<Question> allQuestion() {
        return questionMapper.allQuestion();
    }

    @Override
    public void addQuestion(Question question) {
        questionMapper.insert(question);
    }

    @Override
    public void addResult(Result result) {
        resultMapper.insert(result);
    }

    @Override
    public List<Result> allResult() {
        return resultMapper.allResult();
    }


}
